/*
 * Created on 2006-7-4 5:33:35
 */
package cn.com.sbell.vss.csg.vsclient.hikvision.bean;

import java.text.MessageFormat;

public class LocalStorageFile {
	
	private static final String pattern = "{0,number,0000}-{1,number,00}-{2,number,00} {3,number,00}:{4,number,00}:{5,number,00}";
	
	public String filename;
	
	public int startYear;
	public int startMonth;
	public int startDay;
	public int startHour;
	public int startMin;
	public int startSecond;
	
	public int stopYear;
	public int stopMonth;
	public int stopDay;
	public int stopHour;
	public int stopMin;
	public int stopSecond;

	public int fileSize;

	public String getStartTime(){
		return MessageFormat.format(pattern, 
				new Object[]{
					new Integer(startYear), 
					new Integer(startMonth),
					new Integer(startDay),
					new Integer(startHour),
					new Integer(startMin),
					new Integer(startSecond)
				});
	}
	
	public String getStopTime(){
		return MessageFormat.format(pattern, 
				new Object[]{
					new Integer(stopYear), 
					new Integer(stopMonth),
					new Integer(stopDay),
					new Integer(stopHour),
					new Integer(stopMin),
					new Integer(stopSecond)
				});
	}
}
